clear
clc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INSHEETING THE DATA
%{
Col 1:  Sector Number
Col 2 and 3:  Informal and formal firms
Col 4 and 5:  Informal and formal sales
Col 6:  Variance in total sales
Col 7-10:  90, 10, 75, 25 percentile of sales
Col 11-12:  Total Informal and formal Employees
Col 13:  Average workers
Col 15: Contract worker ratio (without and with 0)
Col 16: Alpha
Col 17: Kappa
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Data = csvread('Rawdata.csv',1,0);
user = char(java.lang.System.getProperty('user.name'));
if strcmp(user, 'ChiplunkarG')
cd 'D:\Dropbox\APcontract_reducedform\JPE micro replication folder\estimation\newmodel';
end

if strcmp(user, 'chiplunkarg')
cd '/Users/chiplunkarg/Library/CloudStorage/Dropbox/APcontract_reducedform/JPE micro replication folder/estimation';
    filepath.output = '/Users/chiplunkarg/Library/CloudStorage/Dropbox/APcontract_reducedform/JPE micro replication folder/output/calibration';
end

run Estimation_algorithm.m
run Derivatives.m
run Theory.m
run ProbabilityFunction.m
